<%@ page language="java" pageEncoding="utf-8"%>
<%@ page import="net.ssta.common.LoginUser"%>
<%@ page import="orest.front.achieve.AchieveHandler"%>
<%@ page import="net.ssta.core.db.RecordSet"%>
<%@ page import="net.ssta.core.db.Record"%>
<%
String path = request.getContextPath();
String userid = LoginUser.getUserId();
RecordSet classtype = AchieveHandler.getNewEnergyClassList();
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd">
<HTML>
<HEAD>
    <TITLE>信息管理-安全生产科技成果推广网</TITLE>
    <META http-equiv=Content-Type content="text/html; charset=utf-8">
    <META http-equiv=x-ua-compatible content=ie=7>
    <META content="MSHTML 6.00.6000.17107" name=GENERATOR>
    <link href="../../common1/css/layout.css" rel="stylesheet" type="text/css" />
	<link href="../../common1/css/user.css" rel="stylesheet" type="text/css" />
    <LINK href="<%=path%>/includes/Fvalidate/style.css" type=text/css rel=stylesheet>
    <script type="text/javascript" src="<%=path%>/includes/DatePicker/WdatePicker.js"></script>
    <script type="text/javascript" src="<%=path%>/includes/styleBase/js/jquery.js"></script>
	<script type="text/javascript" src="<%=path%>/includes/KindEditor/kindeditor.js"></script>    
    <script type="text/javascript" src="<%=path%>/includes/Fvalidate/Fvalidate.js"></script>

    <SCRIPT>  
	$(document).ready(function(){
	$("#frm").Fvalidate({live:true});
    //富文本编辑器
    KE.show({
		id : 'editorContent',
		resizeMode : 1,
		allowUpload : true,
		afterCreate : function(id) {},
		filterMode : true,
		
		items : ["source","|","fullscreen","undo","redo","print","cut","copy","paste","plainpaste",
"wordpaste","|","justifyleft","justifycenter","justifyright","justifyfull","insertorderedlist","insertunorderedlist","indent","outdent","subscript","superscript","|","selectall","-","title","fontname","fontsize","|","textcolor","bgcolor","bold","italic","underline","strikethrough","removeformat","|","image","flash","media","advtable","hr","emoticons","link","unlink","|","about"]
		});
		
		KE.show({
		id : 'marketContent',
		resizeMode : 1,
		allowUpload : true,
		afterCreate : function(id) {},
		filterMode : true,
		
		items : ["source","|","fullscreen","undo","redo","print","cut","copy","paste","plainpaste",
"wordpaste","|","justifyleft","justifycenter","justifyright","justifyfull","insertorderedlist","insertunorderedlist","indent","outdent","subscript","superscript","|","selectall","-","title","fontname","fontsize","|","textcolor","bgcolor","bold","italic","underline","strikethrough","removeformat","|","image","flash","media","advtable","hr","emoticons","link","unlink","|","about"]
		});
	
	});
	
	function saveEditContent(){
		
		if(checkinput()){
			content = KE.util.getPureData("editorContent");
			htmlcontent = KE.html("editorContent");
			
			document.getElementById("INVEST_INTRO").value=content;
			document.getElementById("INVEST_INTROHTML").value=htmlcontent;
			
			marketcontent = KE.util.getPureData("marketContent");
			htmlmarketcontent = KE.html("marketContent");
			
			document.getElementById("INVEST_BENEFITANALY").value = marketcontent;
			document.getElementById("INVEST_BENEFITANALYHTML").value = htmlmarketcontent;
			
			document.frm.action="<%=path%>/membercenter/market?method=addInvest";
			document.frm.submit();
		}
	}
	
	function _cancel(){
		window.location.href = "<%=path%>/membercenter/market?method=investList";
	}
	
	function checkinput(){
		if(!$("#frm").Fvalidate()){return false;}
		/*
		var ck = document.getElementsByName("INVEST_COOPERATEWAY");
		var checkedcount = 0;
		for(i=0;i<ck.length;i++){
			if(ck[i].checked){
				checkedcount++;
				break;
			}
		}
		if(checkedcount<1){
			alert("[合作方式]不能为空");
			return false;
		}
		*/
		if(KE.util.getPureData("editorContent")==null || KE.util.getPureData("editorContent").length<20){
			alert("[投融资项目简要说明]请输入20个汉字以上");
			return false;
		}
		if(KE.util.getPureData("marketContent")==null || KE.util.getPureData("marketContent").length<20){
			alert("[市场及经济效益说明]请输入20个汉字以上");
			return false;
		}
		return true;
	}
	function chooseOne(obj){
		var ck = document.getElementsByName(obj.name);
		for(i=0;i<ck.length;i++){
			if(ck[i].value != obj.value){
				ck[i].checked = false;
			}
		}
	}
    </SCRIPT>   
    <style type="text/css">
<!--
.STYLE1 {color: #FF0000}
-->
    </style>
</HEAD>

<BODY>

<%@include file="../../common1/toplogin.jsp"%>    
<%@include file="../../common1/topbanner.jsp"%> 
<%@include file="../../common1/topmenu.jsp"%> 

<form  id="frm" name="frm"  method="post">
<div id="contentmain">

	<div id="content_left">
	  	<%@include file="../include/userbaseInfo.jsp"%>
		
		 <jsp:include   page="../include/marketleft.jsp"    flush="true">   
		      <jsp:param    name="selected"    value="5"    />   
		 </jsp:include>
	 </div>
    
    
    
    <div id="content_right">
      <jsp:include   page="../include/baseTop.jsp"    flush="true">   
		      <jsp:param    name="open"    value="2"    />   
		</jsp:include>
      <Br />
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td width="26%" height="32" align="right">投融资项目名称<span class="STYLE1">*</span>：&nbsp;</td>
          <td width="74%" align="left"><input type="text"  id="INVEST_TITLE" name="INVEST_TITLE"  size="60" value=""  label="投融资项目名称" class="inputtext" maxlength="70"></td>
        </tr>
        <tr>
          <td align="right" height="32">所属行业领域：&nbsp;</td>
          <td align="left">
          	<select name="INVEST_NEWENERGYCLASS" id="INVEST_NEWENERGYCLASS">
				<option value="">请选择</option>
                <%
				for(int i=0;i<classtype.size();i++){
					Record ecRecord = classtype.get(i);
				%>
					<option value="<%=ecRecord.getString("OPTIONVALUE","").trim()%>"><%=ecRecord.getString("OPTIONNAME","")%></option>
			   <%
			   }
			   %>
			 	
            </select>
          </td>
        </tr>
        <tr>
          <td align="right" height="32">关键词：&nbsp;</td>
          <td align="left"><input type="text" id="INVEST_TOPICWORDS" name="INVEST_TOPICWORDS" size="40" value=""  label="关键词" class="inputtext" maxlength="100" /></td>
        </tr>
        <tr>
          <td align="right" height="32">合作方式：&nbsp;</td>
          <td align="left">
          		<input type="checkbox" name="INVEST_COOPERATEWAY"   value="1" onClick="chooseOne(this)" label="合作方式">合资
                <input type="checkbox" name="INVEST_COOPERATEWAY"   value="2" onClick="chooseOne(this)" label="合作方式">合作
                <input type="checkbox" name="INVEST_COOPERATEWAY"   value="3" onClick="chooseOne(this)" label="合作方式">技术引进
                <input type="checkbox" name="INVEST_COOPERATEWAY"   value="4" onClick="chooseOne(this)" label="合作方式">设备引进
                <input type="checkbox" name="INVEST_COOPERATEWAY"   value="5" onClick="chooseOne(this)" label="合作方式">补偿贸易
                <input type="checkbox" name="INVEST_COOPERATEWAY"   value="6" onClick="chooseOne(this)" label="合作方式">产权转让
                <input type="checkbox" name="INVEST_COOPERATEWAY"   value="7" onClick="chooseOne(this)" label="合作方式">面议
          </td>
        </tr>
        <tr>
          <td align="right" height="32">联系单位：&nbsp;</td>
          <td align="left"><input type="text" maxlength="70"  id="INVEST_LINKUNIT" name="INVEST_LINKUNIT"  size="60" value=""  label="联系单位" class="inputtext" /></td>
        </tr>
        <tr>
          <td align="right" height="32">联系人<span class="STYLE1">*</span>：&nbsp;</td>
          <td align="left"><input type="text" maxlength="15" id="INVEST_LINKMAN" name="INVEST_LINKMAN"  size="30" value="" required="" label="联系人" class="inputtext" /></td>
        </tr>
        <!--
        <tr>
          <td align="right" height="32">联系人电话：&nbsp;</td>
          <td align="left"><input type="text" maxlength="20" id="INVEST_TEL" name="INVEST_TEL"  size="30" value=""   label="联系电话" class="inputtext" /></td>
        </tr>
        -->
        <tr>
          <td align="right" height="32">电话/手机<span class="STYLE1">*</span>：&nbsp;</td>
          <td align="left"><input type="text" maxlength="15" id="INVEST_CELLPHONE" name="INVEST_CELLPHONE"  size="30" value="" class="inputtext" required="" label="电话/手机" /></td>
        </tr>
        <tr>
          <td align="right" height="32">联系人Email：&nbsp;</td>
          <td align="left"><input type="text" maxlength="30" id="INVEST_EMAIL" name="INVEST_EMAIL"  size="30" value="" label="联系人Email" rule="email" error="Email的格式不正确" class="inputtext" /></td>
        </tr>
        <tr>
          <td align="right" height="32">通讯地址：&nbsp;</td>
          <td align="left"><input type="text" maxlength="70" id="INVEST_ADDR" name="INVEST_ADDR"  size="60" value="" label="通讯地址" class="inputtext" /></td>
        </tr>
        <tr>
          <td align="right" height="32">邮编：&nbsp;</td>
          <td align="left"><input type="text" rule="number" maxlength="6" id="INVEST_ZIP" name="INVEST_ZIP"  size="10" label="邮政编码" class="inputtext" /></td>
        </tr>
        <tr>
        	<td align="right" height="32">项目拟投总额(万元)：</td>
            <td align="left">
            	<input type="text"  id="INVEST_INVESTSUMEXPECT" name="INVEST_INVESTSUMEXPECT" maxlength="6" size="10" class="inputtext" label="项目拟投资总额" rule="number">
            	<span class="pmodify_text">	请输入整数倍金额，例如：10</span>
            </td>
        </tr>
        <tr>
        	<td align="right" height="32">项目已投入金额(万元)：</td>
            <td align="left">
            	<input type="text"  id="INVEST_INVESTEDSUM" name="INVEST_INVESTEDSUM" maxlength="6" size="10" class="inputtext"   label="项目已投入金额" rule="number">
                <span class="pmodify_text">	请输入整数倍金额，例如：10</span>
            </td>
        </tr>
        <tr>
        	<td align="right" height="32">项目建设年限(年)：</td>
            <td align="left">
            	<input type="text"  id="INVEST_FIXEDYEAR" name="INVEST_FIXEDYEAR" maxlength="2" size="10" class="inputtext"  label="项目建设年限" rule="number">
                <span class="pmodify_text">	请输入整数年，例如：10</span>
            </td>
        </tr>
        <tr>
          <td align="right" height="32">信息有效期：&nbsp;</td>
          <td align="left"><input type="text"  id="INVEST_VALID" name="INVEST_VALID"  onClick="WdatePicker()" size="10" readonly   label="信息有效期" class="inputtext" /></td>
        </tr>
        <tr>
          <td height="32" align="right">投融资项目简要说明<span class="STYLE1">*</span>：&nbsp;</td>
          <td align="left">
          	<input type="hidden"  id="INVEST_INTRO" name="INVEST_INTRO" value="">
            <input type="hidden"  id="INVEST_INTROHTML" name="INVEST_INTROHTML" value="">
            
            <textarea class=""  id ="editorContent" name="editorContent" error="正文内容不能为空或过于简洁！" label="投融资项目简要说明" style="width:98%;height:195px;visibility:hidden;word-wrap:break-word;word-break:break-all;"></textarea>
          </td>
        </tr>
        <tr>
        	<td height="32" align="right">市场及经济效益说明<span class="STYLE1">*</span>：</td>
          <td align="left">
            <input type="hidden"  id="INVEST_BENEFITANALY" name="INVEST_BENEFITANALY" value="" class="input_text_grey">
            <input type="hidden"  id="INVEST_BENEFITANALYHTML" name="INVEST_BENEFITANALYHTML" value="" class="input_text_grey">
            <textarea class=""  id ="marketContent" name="marketContent" error="正文内容不能为空或过于简洁！" label="市场及经济效益说明" style="width:98%;height:195px;visibility:hidden;word-wrap:break-word;word-break:break-all;"></textarea>
          </td>
        </tr>
        <tr>
          <td height="50">&nbsp;</td>

          <td align="left"><img src="<%=path%>/common1/images/user/botton_6.gif" title="提交发布" onClick="javascript:saveEditContent();" style="cursor:hand;"/>
            <img src="<%=path%>/common1/images/user/botton_7.gif" title="取消发布" border="0" style="cursor:hand;" onClick="javascript:cancel();" /> </td>

        </tr>
        <tr>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
        </tr>
      </table>
    </div>
</div>
</form>

<%@include file="../../common1/bottom.jsp"%>    

</BODY>
</HTML>
